package com.dounine.search;

import java.util.Random;
import java.util.regex.Pattern;

/**
 * Created by huanghuanlai on 16/4/12.
 */
public class AccountRandom {

    static Random random = new Random();
    public static String random(){
        StringBuilder sb = new StringBuilder();
        for(int i =0;i<7;i++){
            sb.append((char)(97+random.nextInt(25)));
        }
        return sb.toString();
    }

    public static void main(String[] args){
        Pattern pattern = Pattern.compile("[a-z]{7,7}");
        System.out.println(pattern.matcher("a8aaaaaa").matches());
    }
}
